import request from '../utils/request'

//获取是否管理员的标志
export function isAdmin(): any {
  return request({
    url: '/user/isAdmin',
    method: 'get'
  })
}
export function getSysNoticeListLimit(): any {
  return request({
    url: '/user/getSysNoticeListLimit',
    method: 'get'  
  })
}
export function getSysNoticeList(data: any): any {
  return request({
    url: '/user/getSysNoticeList',
    method: 'post',
    data,
  })
}
export function getAllCourseNoticeList(): any {
  return request({
    url: '/user/getAllCourseNoticeList',
    method: 'get'  
  })
}
//获取用户课程notice列表
export function getCourseNoticeList(query: any): any {
  return request({
    url: '/user/getCourseNoticeList',
    method: 'get',
    params: query,
  })
}

// 删除课程notice
export function deleteNotice(data: any): any {
  return request({
    url: '/user/deleteNotice',
    method: 'post',
    data,
  })
}

// 保存课程notice
export function saveNotice(data: any): any {
  return request({
    url: '/user/saveNotice',
    method: 'post',
    data,
  })
}